package io.fft.flight.modules.flight.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.fft.flight.common.service.impl.CrudServiceImpl;
import io.fft.flight.modules.flight.dao.OrderSegmentRuleDao;
import io.fft.flight.modules.flight.dto.OrderSegmentRuleDTO;
import io.fft.flight.modules.flight.entity.OrderSegmentRuleEntity;
import io.fft.flight.modules.flight.service.OrderSegmentRuleService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 退改规则
 *
 * @author likailun kellenli30541@gmail.com
 * @since 1.0.0 2024-06-19
 */
@Service
public class OrderSegmentRuleServiceImpl extends CrudServiceImpl<OrderSegmentRuleDao, OrderSegmentRuleEntity, OrderSegmentRuleDTO> implements OrderSegmentRuleService {

    @Override
    public QueryWrapper<OrderSegmentRuleEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<OrderSegmentRuleEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}